package ink.yuanchu.picachoframework.service.bo;

import com.baomidou.mybatisplus.extension.service.IService;
import ink.yuanchu.picachoframework.entity.Permissions;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 *
 * @author ziyuan
 * @Date: 2021/03/20/13:03
 * @Description:
 */
@Configuration
public interface PermissionsBO extends IService<Permissions> {

    /**
     * 根据角色id查询
     * @param roleId
     * @return
     */
    List<Permissions> findByRoleId(String roleId);

    /**
     * 根据permissionId去重查询
     * @return
     */
    List<Permissions> distinctPermissionId();

    /**
     * 查询所有
     * @return
     */
    List<Permissions> findAll();
}
